/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

function init(){
   
    var deleteButton = document.getElementsByName("DELETE");
    if(deleteButton!=null){
        for (i = 0; i < deleteButton.length; i++) {
            deleteButton[i].addEventListener('click', deleteItem, false);
        }
    }


}

function deleteItem(){
    var form = dojo.byId("UpdateCartForm");
    var lineItemIdToDelete = dojo.byId("DELETE_LINE_ITEM")
    var buttonId = this.id;
    lineItemIdToDelete.value = buttonId;
    form.submit();
}




